import React,{useState,useEffect} from 'react'
import Login from './component/mine/Login'
import Info from './component/mine/Info'

export default function Mine() {
    let  [isLogin,setLogin] = useState(false);
    let  token  = window.localStorage.getItem("token");
  
    useEffect(()=>{
        if(token){
            setLogin(true);
            
        }
    },[]);


  return (
    <div>  
        {isLogin?<Info></Info>:<Login></Login>}      
    </div>
  )
}
